{% extends 'home/base.html' %}
{% block title %}Medicine{% endblock %}
{% block heading %}Prescribe{% endblock %}
{% block body %}
<div class="row">
  <form class="col s12" action='/bill/do_generate/' method="POST">
      <ul>
        <li>
            <div class="input-field col s6">
              <input type="search" name="item_not_sure" placeholder="输入药品关键词">
              <button type="submit" class="btn">search</button>
          </div>
        </li>
    </ul>
  </form>

<div class="row">
  <form class="col s12" action='/bill/do_generate/' method="POST">
    {%csrf_token%}
    <input type="hidden" name="case" value="{{case.id}}">
    <div class="row">
      <div class="input-field col s12">
        <select name="item" id="item" class="validate" required>
          {% for items in item %}
          <option value='{{items.id}}'>{{items.item_name}}</option>
          {% endfor %}
        </select>
        <label for="item">Item</label>
      </div>
      <div class="input-field col s12">
        <input type="number" name="quantity" id="quantity" class="validate" required>
        <label for="quantity">Quantity</label>
      </div>
      <div class="input-field col s12">
        <textarea name="description" id="description" class="materialize-textarea" required></textarea>
        <label for="description">Description</label>
      </div>
      <button type="submit" class="btn">Generate</button>
    </div>
  </form>
</div>
{% endblock %}